home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tools / vim / macros / keyword < prev    next >
Text File  |  1995-03-09  |  520b  |  15 lines

  1. " Some handy keyword-completion macros.
  2. " The word in front of the cursor is taken as a search string, the previous
  3. " partially matching word is found which then replaces the word in front
  4. " of the cursor. The macros work in insert mode.
  5. "
  6. " ^K searches backward for the first match
  7. " ^N searches backward for the next match (after ^K)
  8. " ^P searches forward for the previous match (after ^K)
  9. "
  10. " Thanks to Dave Caughey.
  11. "
  12. :map!   bmmi?\<`m"nyf@nmn"nyw`mcfn
  13. :map!  .`nnmn"nyw`mcf.n
  14. :map!  .`nNmn"nyw`mcf.n
  15.